<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div {
				height: 200px;
				width: 200px;
				background-color: red;
				border: 20px solid blue;
				padding: 20px;
			}
		</style>
	</head>
	<body>
		<div id="">

		</div>
		<script type="text/javascript">
			//client宽度和offsetWidth最大的区别就是不包含边框
			var div = document.querySelector("div");
			console.log(div.clientWidth);
		</script>
	</body>
</html>
